<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-wrap align-center justify-between benben-position-layout flex resultPayment_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center resultPayment_fd0_0' @tap.stop="handleJumpDiy" data-type="back"
					data-url="1">
					<text class='fu-iconfont2  confirmOrder_fd0_0_c0_c0'>&#xE794;</text>
				</view>
				<text class='resultPayment_fd0_1'>支付结果</text>
				<view class='flex flex-wrap align-center resultPayment_fd0_0'>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-center benben-flex-layout">
				<image class='resultPayment_fd1_0' mode="aspectFit" :src='STATIC_URL+"507.png"'></image>
				<text class='resultPayment_fd1_1'>支付成功</text>
				<view class='flex flex-wrap align-center'>
					<text class='resultPayment_fd1_2_c0'>支付方式</text>
					<text class='resultPayment_fd1_2_c1' v-if="payID == 'wxpay'">微信支付</text>
					<text class='resultPayment_fd1_2_c1' v-if="payID == 'alipay'">支付宝支付</text>
					<text class='resultPayment_fd1_2_c1' v-if="payID == 'balance'">余额支付</text>
				</view>
				<view class='flex flex-wrap align-center resultPayment_fd1_3'>
					<text class='resultPayment_fd1_2_c0'>支付时间</text>
					<text class='resultPayment_fd1_2_c1'>{{pay_time}}</text>
				</view>
				<button class='resultPayment_fd1_4' @tap.stop="handleJumpDiy" data-type="switchTab"
					:data-url="`/pages/tabBar/myCourse/myCourse`">查看课程</button>
				<button class='resultPayment_fd1_5' @tap.stop="toHomeDiy()">返回首页</button>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"order_sn": "",
				"payID": "wxpay",
				"pay_time": "",
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				order_sn,
				payID
			} = options
			if (order_sn !== undefined) this.order_sn = order_sn
			if (payID !== undefined) this.payID = payID
			this.pay_time = this.getNowDate();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			getNowDate() {
			  var date = new Date();
			  var sign2 = ":";
			  var year = date.getFullYear() // 年
			  var month = date.getMonth() + 1; // 月
			  var day = date.getDate(); // 日
			  var hour = date.getHours(); // 时
			  var minutes = date.getMinutes(); // 分
			  var seconds = date.getSeconds() //秒
			  var weekArr = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'];
			  var week = weekArr[date.getDay()];
			  // 给一位数的数据前面加 “0”
			  if (month >= 1 && month <= 9) {
			    month = "0" + month;
			  }
			  if (day >= 0 && day <= 9) {
			    day = "0" + day;
			  }
			  if (hour >= 0 && hour <= 9) {
			    hour = "0" + hour;
			  }
			  if (minutes >= 0 && minutes <= 9) {
			    minutes = "0" + minutes;
			  }
			  if (seconds >= 0 && seconds <= 9) {
			    seconds = "0" + seconds;
			  }
			  return year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds;
			  // return year + "-" + month + "-" + day + " " + hour + sign2 + minutes;
			}
		}
	};
</script>
<style lang="scss" scoped>
	.confirmOrder_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;
	}

	.resultPayment_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.resultPayment_fd0_1 {
		color: #333333;
		font-size: 36rpx;
		font-weight: 500;
		line-height: 50rpx;
	}

	.resultPayment_fd0_0_c0 {
		width: 20rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 32rpx;
	}

	.resultPayment_fd0_0 {
		width: 100rpx;
		height: 88rpx;
	}

	.resultPayment_fd1_5 {
		background: #f8f8f8;
		font-size: 28rpx;
		color: #333;
		width: 320rpx;
		height: 70rpx;
		line-height: 70rpx;
		margin: 33rpx 0rpx 112rpx 0rpx;
		border-radius: 8rpx;
	}

	.resultPayment_fd1_4 {
		background: var(--benbenbgColor0);
		font-size: 28rpx;
		color: #fff;
		width: 320rpx;
		height: 70rpx;
		line-height: 70rpx;
		border-radius: 8rpx;
	}

	.resultPayment_fd1_3 {
		margin: 16rpx 0rpx 87rpx 0rpx;
	}

	.resultPayment_fd1_2_c1 {
		color: #666666;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
	}

	.resultPayment_fd1_2_c0 {
		color: #666666;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
		margin: 0rpx 10rpx 0rpx 0rpx;
	}

	.resultPayment_fd1_1 {
		color: #000000;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
		margin: 40rpx 0rpx 30rpx 0rpx;
	}

	.resultPayment_fd1_0 {
		width: 320rpx;
		height: 320rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 88rpx 0rpx 0rpx 0rpx;
	}
</style>